/*
 * FixMultiViewPager 2016-12-26
 * Copyright (c) 2016 suzeyu Co.Ltd. All right reserved
 */
package com.polaris.live.utils.photo

import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.MotionEvent
import androidx.viewpager.widget.ViewPager

/**
 * FixMultiViewPager
 * @author Created by 天晴 on 2024/1/15 03:12
 * @since 1.0.0
 */
class FixMultiViewPager(
    context: Context, attrs: AttributeSet? = null
) : ViewPager(context, attrs) {

    override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
        try {
            return super.onInterceptTouchEvent(ev)
        } catch (ex: IllegalArgumentException) {
            Log.w(TAG, "onInterceptTouchEvent() ", ex)
            ex.printStackTrace()
        }
        return false
    }

    companion object {

        private val TAG = FixMultiViewPager::class.java.simpleName
    }
}